@extends("admin.layout.main")

@section("css")
	<link rel="stylesheet" href="/adstatic/order/order.css" media="all" />
@endsection

@section("content")

	<form class="layui-form" action="">
	<blockquote class="layui-elem-quote news_search">
		<div class="layui-inline">
		    <div class="layui-input-inline">
		    	<input type="text" value="{{ $querystr }}" placeholder="请输入关键字" class="layui-input search_input">
		    </div>
		    <a class="layui-btn search_btn" >查询</a>
		</div>

		<div class="layui-form-item">
			<div class="layui-input-block" >
				<select name="send_status" class="select-send-status" lay-verify="required" >
					<option value="-1"{{$status==-1?'selected':''}}>全部</option>
					<option value="0" {{$status==0?'selected':''}}>未发货</option>
					<option value="1" {{$status==1?'selected':''}}>已发货</option>
					<option value="2" {{$status==2?'selected':''}}>已退货</option>
				</select>
			</div>
		</div>
	</blockquote>
	</form>
	<div class="layui-form order_list">
	  	<table class="layui-table">
		    <thead>
				<tr>
					{{--<th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose" id="allChoose"></th>--}}
					<th>用户ID</th>
					<th>地区</th>
					<th>地址</th>
					<th>收件人</th>
					<th>收件人联系方式</th>

					<th>支付状态</th>
					<th>发货状态</th>
					<th>运单号</th>
					<th>快递公司</th>
					<th>订单编号</th>
					<th>创建时间</th>
					<th>操作</th>

				</tr>
		    </thead>
			<tbody class="show-my-children">
			   @foreach($order as $o)
				   <tr>
						<td>
							{{$o->uid}}
						</td>
					   <td title="{{$o->area}}">
						   {{str_limit($o->area,10,'...')}}
					   </td>
					   <td title="{{$o->address}}">
						   {{str_limit($o->address,10,'...')}}
					   </td>
					   <td title="{{$o->receiver}}">
						   {{$o->receiver}}
					   </td>
					   <td title="{{$o->receiver_tel}}">
						   {{str_limit($o->receiver_tel,10,'...')}}
					   </td>
					   <td>
						   {{$o->pay_status==0?'未支付':($o->pay_status==1?'已支付':'已退款')}}
					   </td>
					   <td>
						   {{$o->send_status==0?'未发货':($o->send_status==1?'已发货':'已退货')}}
					   </td>
					   <td title="{{$o->send_no}}">
						   {{str_limit($o->send_no,10,'...')}}
					   </td>
					   <td title="{{$o->send_company}}">
						   {{str_limit($o->send_company,10,'...')}}
					   </td>
					   <td title="{{$o->order_no}}">
						   {{str_limit($o->order_no,10,'...')}}
					   </td>
					   <td>
						   {{date('Y-m-d H:i:s',$o->create_time)}}
					   </td>
					   <td>
						   <a data-id="{{$o->order_id}}" class="layui-btn layui-btn-normal layui-btn-mini change-status" >
							   <i class="layui-icon"></i>
							   修改状态
						   </a>
						   <a data-id="{{$o->order_id}}" class="layui-btn layui-btn-mini look-detail" >
							   <i class="layui-icon"></i>
							  查看详情
						   </a>
					   </td>
				   </tr>
				   @endforeach
			</tbody>
		</table>
	</div>
	<div style="text-align: right;">
		{{ $order->links('admin.layout.paginate') }}
	</div>
@endsection

@section("js")
	{{--<script type="text/javascript" src="/select/js/jquery-1.11.3.min.js"></script>--}}
	<script type="text/javascript" src="/adstatic/order/order.js"></script>
	{{--<script type="text/javascript" src="/adstatic/layui/layui.js"></script>--}}
@endsection
